#define _CRT_SECURE_NO_WARNINGS
class Solution {
public:
    bool CheckPermutation(string s1, string s2) {
        int hash[26] = { 0 };
        for (auto e : s1)
            hash[e - 'a']++;
        for (auto ch : s2)
        {
            hash[ch - 'a']--;
        }
        for (int i = 0; i < 26; i++)
            if (hash[i] != 0)
                return false;
        return true;
    }
};